
export const POWERCONSTANT={
    [PWR_GENERATE_OPS] :"PWR_GENERATE_OPS",
    [PWR_OPERATE_SPAWN] : "PWR_OPERATE_SPAWN",
    [PWR_OPERATE_TOWER] : "PWR_OPERATE_TOWER",
    [PWR_OPERATE_STORAGE] :"PWR_OPERATE_STORAGE",
    [PWR_OPERATE_LAB] :"PWR_OPERATE_LAB",
    [PWR_OPERATE_EXTENSION] :"PWR_OPERATE_EXTENSION",
    [PWR_OPERATE_OBSERVER] : "PWR_OPERATE_OBSERVER",
    [PWR_OPERATE_TERMINAL] :"PWR_OPERATE_TERMINAL",
    [PWR_DISRUPT_SPAWN] :"PWR_DISRUPT_SPAWN",
    [PWR_DISRUPT_TOWER] :"PWR_DISRUPT_TOWER",
    [PWR_DISRUPT_SOURCE] :"PWR_DISRUPT_SOURCE",
    [PWR_SHIELD] :"PWR_SHIELD",
    [PWR_REGEN_SOURCE] :"PWR_REGEN_SOURCE",
    [PWR_REGEN_MINERAL] :"PWR_REGEN_MINERAL",
    [PWR_DISRUPT_TERMINAL] :"PWR_DISRUPT_TERMINAL",
    [PWR_OPERATE_POWER] :"PWR_OPERATE_POWER",
    [PWR_FORTIFY] :"PWR_FORTIFY",
    [PWR_OPERATE_CONTROLLER] :"PWR_OPERATE_CONTROLLER",
    [PWR_OPERATE_FACTORY] :"PWR_OPERATE_FACTORY"
}
// 基本元素矿
export const BaseMinerialConst= new Set<MineralConstant>(
    [
        // 元素矿
        RESOURCE_UTRIUM,
        RESOURCE_LEMERGIUM,
        RESOURCE_KEANIUM,
        RESOURCE_ZYNTHIUM,
        RESOURCE_OXYGEN,
        RESOURCE_HYDROGEN,
        RESOURCE_CATALYST,
    ])

export const BaseMinerial= new Set<ResourceConstant>(
    [
        // 元素矿
        RESOURCE_UTRIUM,
        RESOURCE_LEMERGIUM,
        RESOURCE_KEANIUM,
        RESOURCE_ZYNTHIUM,
        RESOURCE_OXYGEN,
        RESOURCE_HYDROGEN,
        RESOURCE_CATALYST,
        RESOURCE_GHODIUM,   // G 对工厂而言也是基础矿物
        // 能量
        RESOURCE_ENERGY,

        // 四种基础商品
        RESOURCE_METAL,
        RESOURCE_BIOMASS,
        RESOURCE_SILICON,
        RESOURCE_MIST
    ])

export const ZipMinerial:Record<MineralConstant, CommodityConstant> = {
    [RESOURCE_OXYGEN]:RESOURCE_OXIDANT,
    [RESOURCE_HYDROGEN]:RESOURCE_REDUCTANT,
    [RESOURCE_UTRIUM]:RESOURCE_UTRIUM_BAR,
    [RESOURCE_LEMERGIUM]:RESOURCE_LEMERGIUM_BAR,
    [RESOURCE_KEANIUM]:RESOURCE_KEANIUM_BAR,
    [RESOURCE_ZYNTHIUM]:RESOURCE_ZYNTHIUM_BAR,
    [RESOURCE_CATALYST]:RESOURCE_PURIFIER,
}

export const UnZipMinerial:Record<CommodityConstant, MineralConstant> = {
    [RESOURCE_OXIDANT]:RESOURCE_OXYGEN,
    [RESOURCE_REDUCTANT]:RESOURCE_HYDROGEN,
    [RESOURCE_UTRIUM_BAR]:RESOURCE_UTRIUM,
    [RESOURCE_LEMERGIUM_BAR]:RESOURCE_LEMERGIUM,
    [RESOURCE_KEANIUM_BAR]:RESOURCE_KEANIUM,
    [RESOURCE_ZYNTHIUM_BAR]:RESOURCE_ZYNTHIUM,
    [RESOURCE_PURIFIER]:RESOURCE_CATALYST,
} as any

export const goods_sold_backlist= new Set<ResourceConstant>([
    RESOURCE_COMPOSITE,
    RESOURCE_LIQUID,
    RESOURCE_CRYSTAL,

]);

export const goods_sold_price:Record<CommodityConstant,number>=
{

} as any;

export const controller_energy=[
    0,
    200,
    45000,
    135000,
    405000,
    1215000,
    3645000,
    10935000,
]
export const config_rampart_hits=[
    0,
    0,
    300000,
    1000000,
    3000000,
    10000000,
    30000000,
    100000000,
    300000000,
]
export const MoveTips: { [key in DirectionConstant]: string } = {
    1: '↑',
    2: '↗',
    3: '→',
    4: '↘',
    5: '↓',
    6:'↙',
    7:'←',
    8: '↖'
 };

export const rampart_max_hits= 20000000;
export const repair_addition = 100000;
export const import_structure:Record<string,number>={
    [STRUCTURE_TERMINAL]:1,
    [STRUCTURE_STORAGE]:1,
    [STRUCTURE_NUKER]:2,
    [STRUCTURE_FACTORY]:3,
    [STRUCTURE_POWER_SPAWN]:3,
    [STRUCTURE_LAB]:2,
}

export const default_visual_text_style={
     font: 0.2
}

export const table_title_style:TextStyle= {
    color:'#E1E8BA',
    backgroundColor:'#236928',

    font: 0.7,
    align: "left",
    opacity:0.25
}
export const  renewTTL= 1300;
export const table_row_style:TextStyle= {
    color:'#E1E8BA',
    backgroundColor:'#0F3A43',
    font: 0.6,
    align: "left",
    opacity:0.25
}
export const structureTip_style:TextStyle= {
    color:'#E1E8BA',
    font: 0.3,
    align: "center",
    opacity:0.25
}

export const default_polyStyle:PolyStyle={
    fill:undefined,
    lineStyle:"solid" ,
    stroke:"#8ED9D1",
    opacity:0.1
}

export const dangrous_style:LineStyle={
    color:"#A60000",
    lineStyle:"dotted"
}

export const target_style:LineStyle={
    color:"#85004B",
    lineStyle:"solid"
}

export const path_style:PolyStyle={stroke: '#e67e22', strokeWidth: .3,
opacity: .2, lineStyle: 'dashed'}
